Repository navigation
docs(android): add RTL Support for the Android UI Kit - #627
Conversation
New page ui-kit/android/rtl-support: layout direction vs language, android:supportsRtl, the global setting (UIKitSettingsBuilder / CometChatUIKit.setLayoutDirection) and the per-component setting (Compose layoutDirection, Views setCometChatLayoutDirection / app:cometchatLayoutDirection), which setting wins, base components, what mirrors and what doesn't, digits and dates, custom views and overlays, and upgrading notes. Also: a Layout Direction section and Functionality row on 18 component pages; Localize (setLocale is language-only, isRtl removed), Methods, Troubleshooting, View Slots and the llms index; kit "toast" wording changed to snackbar; nav entry after Localize. Matches uikit-android PR #984 @ a4b44a10c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…l-support # Conflicts: # ui-kit/android/conversations.mdx # ui-kit/android/message-list.mdx
- Bump the UI Kit version to 6.3.1 in the setup and upgrade pages. - Localize: group action message keys, isRtl deprecated (kept, not removed). - RTL Support: available from 6.3.1, digits for file sizes, timers and durations, upgrade table matches the release. - Message bubble styling: file subtitle shows the sent date and size. - Overview: RTL row in the quick reference and an "Upgrading from 6.3.0" section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since uikit-android d0d7c7f17 both kits show offline notices with the kit snackbar, which follows the component's layout direction. Update the Conversations, Message List and Offline Support pages to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Overview and RTL upgrading notes: bubble-margin named arguments (left/right -> start/end) are the one source change; positional calls and Compose calls compile unchanged. - Text with no letters reads left to right in bubbles and the composer (ENG-58494). - Code blocks join audio/video players as always left to right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install snippets, the llms index, "available since", "deprecated in" and the overview/RTL page now say 6.4.0 (tag v6.4.0). "Upgrading from 6.3.0" and "6.3.0 or later" are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) - RTL page: "mirrors its components" (exceptions follow), and the mirrored-icons row adds message privately (checked against the autoMirrored drawables in v6.4.0). - Methods and the 18 component Layout Direction sections name the version: needs / available since UI Kit 6.4.0. - Incoming, Outgoing and Ongoing Call: the call screen the UI Kit opens follows the global setting; the component's own direction applies in your own screen. - Offline Support: plurals overrides replace the whole element; Arabic needs zero, one, two, few, many and other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI Assistant Chat History, Pinned Messages, Saved Messages and Search now have a --- before the section, like the other component pages (same finding as F6 in the React Native review, #645). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raj-dubey1
left a comment
There was a problem hiding this comment.
Automated review (Claude)
Requested by Hritika Naik on Slack · commit d6d2989deb · round 1
Verdict: Approved · from this PR: 3 nits; 2 in older code, not blocking
This PR adds a thorough RTL Support page for the Android UI Kit, consistent Layout Direction sections on all 18 component pages, and the 6.3.0 → 6.4.0 version bump. The pages agree with one another on API names, precedence rules, the version label and the upgrade notes. Nav, links and anchors are clean. The remaining items are small polish:
- add the
CometChatLayoutDirectionimport to the short snippets; - name the receiver in the RTL upgrade table (
CometChatUIKit.setLayoutDirection); - mention
AUTOin the component rows; - add a layout-direction bullet to the Pinned and Saved Messages Functionality lists.
This review did not check the API names and the binary-compatibility claim against the uikit-android v6.4.0 source, because that source was not available here. They rest on the author's stated check against tag v6.4.0.
Introduced by this PR
- ⚪ F1 nit
ui-kit/android/rtl-support.mdx:269: Upgrade table calls setLayoutDirection without naming the receiver
rtl-support.mdx:269 says "callsetLayoutDirection(CometChatLayoutDirection.RTL)" with no receiver. The same page has two methods with that name:UIKitSettings.UIKitSettingsBuilder().setLayoutDirection(line 89, at init) andCometChatUIKit.setLayoutDirection(line 110, at runtime). overview.mdx:109 says it explicitly:CometChatUIKit.setLayoutDirection(CometChatLayoutDirection.RTL). Fix: writeCometChatUIKit.setLayoutDirection(CometChatLayoutDirection.RTL)(orUIKitSettingsBuilder().setLayoutDirection(...)at init), to match overview.mdx:109.
class: introduced — file added by this PR - ⚪ F2 nit
ui-kit/android/conversations.mdx:1013: Layout Direction snippets use CometChatLayoutDirection without its import
The new Views/Compose snippets useCometChatLayoutDirection.RTLwithout an import. Examples: conversations.mdx:1013 and :1020, the same pattern on all 18 component pages, and rtl-support.mdx:110-113, which also usesCometChatUIKitandactivityundeclared. Only rtl-support.mdx:81-83 showsimport com.cometchat.uikit.core.CometChatLayoutDirection. Someone copying a component-page snippet gets an unresolved reference with no hint of the package. Fix: addimport com.cometchat.uikit.core.CometChatLayoutDirectionto the Kotlin snippets, or a one-line note naming the package.
class: introduced — line is in the PR diff - ⚪ F3 nit
ui-kit/android/conversations.mdx:491: Component method rows list only LTR/RTL, not AUTO
The new row on every component page lists the values as "LTRorRTL... unset inherits it": conversations.mdx:491, incoming-call.mdx:219 and the matching rows elsewhere. rtl-support.mdx:14, :99 and :152 documentCometChatLayoutDirection.AUTOas the default and say you can "leave it unset, or passAUTO". The row is not wrong, but a reader of a component page can't tell thatAUTOis an accepted value. Fix: write "AUTO(default, inherits),LTRorRTL".
class: introduced — line is in the PR diff
Pre-existing / not touched by this PR
Informational: these are not from this PR and do not block it. Worth a ticket where they matter.
- 🟡 F5 minor
ui-kit/android/troubleshooting.mdx:84: Pre-existing broken anchor #upgrading-from-62x (rendered id is upgrading-from-6-2-x)
docs-linkcheck --base origin/main .(exit 0, WARN) checked the rendered pages and reports that /ui-kit/android/overview has no heading idupgrading-from-62x; the rendered id isupgrading-from-6-2-x. The same link is on origin/main:ui-kit/android/troubleshooting.mdx:84, and the heading## Upgrading from 6.2.xwas not renamed by this PR (origin/main:overview.mdx:103). It does not block this PR. Fix: change the link to#upgrading-from-6-2-x; a one-line fix can ride along here, or file a ticket.
class: pre_existing — blame e63e3b3 predates the PR - ⚪ F4 nit
ui-kit/android/pinned-messages.mdx:139: Pinned/Saved Messages Functionality lists don't mention layout direction
The PR description says each of the 18 component pages gains a Functionality row. pinned-messages.mdx (## Functionality at :139, a bullet list) and saved-messages.mdx (## Functionality at :130) gain only the## Layout Directionsection at :153 and :144. Neither Functionality list nor callback table mentionssetCometChatLayoutDirection/layoutDirection. The section is present and correct, so nothing is missing for a reader who scrolls to it. Fix: add a "Layout direction" bullet linking to the section, or correct the PR description.
class: pre_existing — blame 3bc6449 predates the PR
Coverage
| Row | State |
|---|---|
| Files dispositioned | 36 |
| Chunks | 1 |
| Interactions | One chunk, so the plan printed no cross-chunk pairs. Combining pass checked: |
- API names (setLayoutDirection, setCometChatLayoutDirection, app:cometchatLayoutDirection, the layoutDirection parameter, |
| Tests prove | Docs-only PR: no unit tests apply. The proof is the rendered link/anchor check: docs-linkcheck checked 89 links on added lines, 65 incoming anchors and 72 rendered anchors, with result PASS. |
| Commits | 8 commits on origin/main..d6d2989: 1f96a83, d0e7dfb (merge of main), d78276b, 63c9bc2, 4908b34, e93d480, 1af94e7, d6d2989. All are docs(android)/docs(ENG-41248) and in scope. The merge-confli |
| Claims | Verified against the diff: - The new page sits under Customization after Localize in docs.json.
- All 18 component pages have a
---separator before## Layout Direction. - Localize lists 25 group- |
| Public surface | Docs only. Adds one new page URL (/ui-kit/android/rtl-support) and new headings: Layout Direction on 18 pages, Upgrading from 6.3.0 in overview, Group Action Messages in localize, and an RTL section i |
| Acceptance | No ticket acceptance criteria were supplied. Judged against the PR's stated scope (ENG-41248 X1: one RTL page for the Android UI Kit plus component-page sections). Met, apart from the nit on the Pinne |
| Frozen findings | Round 1: none carried. |
Checks run
| Command | Exit | Result |
|---|---|---|
git log --oneline origin/main..HEAD; git diff --stat origin/main...HEAD |
0 | 8 commits, 36 files, +1031/-39 |
python3 ~/.claude/skills/cometchat-review/scripts/review-ledger.py plan --repo . --base origin/main --md |
0 | One chunk C1, 36 files, no cross-chunk pairs |
python3 -c "import json;d=json.load(open('docs.json'));print('ok')" |
0 | ok |
~/.multica/bin/docs-linkcheck --base origin/main . |
0 | PASS: 35 changed pages, 89 links, 65 incoming anchors, 72 rendered anchors. 1 WARN, the pre-existing troubleshooting.mdx:84 link to #upgrading-from-62x |
git grep -n "upgrading-from-62x\/Upgrading from 6.2" origin/main -- ui-kit/android/overview.mdx ui-kit/android/troublesh |
0 | The same link and heading exist on origin/main, so the WARN is pre-existing |
git grep -n -i "layoutDirection\/Layout Direction" HEAD -- ui-kit/android/{conversations,pinned-messages,saved-messages, |
0 | Names and versions consistent; findings confirmed at the cited lines |
git grep -n "setLocale(\/Language\.ARABIC\/isRtl" HEAD -- ui-kit/android |
0 | setLocale signature and isRtl deprecation consistent across pages |
git grep -n "presentation\.(pinnedmessages/savedmessages/incomingcall/...)" HEAD -- ui-kit/android |
0 | New XML tags match the package paths already used on those pages |
gh api repos/cometchat-team/uikit-android/git/refs/tags/v6.4.0 |
1 | Denied by the permission policy. Android source not reachable, so API claims are marked unverified |
Right-to-left (RTL) docs for the Android UI Kit v6 (Kotlin XML Views and Jetpack Compose), and the other changes in UI Kit 6.4.0. Matches the release PR uikit-android #1037, merged to
master-v6in #1038 (tagv6.4.0@2e2f6be70), which includes the RTL work from #984, and the RTL developer-experience doc (D-RTL-2). Task: ENG-41248 (X1, one RTL page per UI Kit). The other kits: #618 (React, Angular), #622 (Flutter), #623 (iOS), #645 (React Native).UI Kit 6.4.0 is published on Maven (
chatuikit-kotlin-android,chatuikit-compose-androidandchatuikit-core-android;latest= 6.4.0), so this can merge now.New page
ui-kit/android/rtl-support, under Theming after Localize, available from UI Kit 6.4.0. Same outline as the Flutter page:android:supportsRtlrequirement;UIKitSettingsBuilder.setLayoutDirection,CometChatUIKit.setLayoutDirection);layoutDirection, ViewssetCometChatLayoutDirection/app:cometchatLayoutDirection, and the components that take it;123 + 456 = 579, reads left to right in bubbles and in the composer;left/right→start/end).Updated pages
---separator before it on every page. Incoming, Outgoing and Ongoing Call add that the call screen the UI Kit opens follows the global setting; the component's own direction applies when you host it in your own screen.left =/right =named arguments becomestart =/end =.setLocalechanges the language only. New "Group Action Messages" section: the lines are translated and say "You" for the logged-in user, with all 25 string keys.isRtlstays in the API table, marked deprecated in 6.4.0 (it is kept, not removed).setLayoutDirectionin theUIKitSettingstable (needs UI Kit 6.4.0 or later), and a Layout Direction section.<plurals>keys: an override replaces the whole element, and Arabic needszero,one,two,few,manyandother.Main is merged in (the 6.3.0 offline docs); the two conflicts in Conversations and Message List keep both the offline rows and the layout-direction row.
Checks
v6.4.0@2e2f6be70.autoMirroreddrawables in v6.4.0.mint broken-links: no broken links. All new anchors resolve.Carried over from the React Native review (#645)
PR #645 had three automated review rounds and was approved. Each finding was checked against this PR:
autoMirroreddrawables; added "message privately"---before Layout Directionvalues-aroverrideType of Change
Checklist
Screenshots (if applicable)
N/A. Text-only changes. RTL screenshots will follow in a separate update.
🤖 Generated with Claude Code